package tt.dz.order.util.excel;

import java.util.List;

/**
 * Created by huangchuan on 2017/7/7.
 *
 * Excel的表头信息
 */
public class ExcelHeader {

    private String oneHeader; // 一级表头

    private List<String> twoHeaders; //二级表头,为null时表示一级表头的单元格的列需要合并

    public ExcelHeader(String oneHeader) {
        this(oneHeader, null);
    }

    public ExcelHeader(String oneHeader, List<String> twoHeaders) {
        this.oneHeader = oneHeader;
        this.twoHeaders = twoHeaders;
    }

    public String getOneHeader() {
        return oneHeader;
    }

    public List<String> getTwoHeaders() {
        return twoHeaders;
    }

    public int cellSize() {
        if(twoHeaders == null) {
            return 1;
        }
        return twoHeaders.size();
    }
}
